#include <header.h>

int main(){

    int fd1 = open("1.txt", O_RDWR);
    int fd2 = open("2.txt", O_RDWR);


    while(1){
        

        char buf[100] = {0};
        ssize_t ret =read(STDIN_FILENO, buf, sizeof(buf));
        //write(fd1, buf, sizeof(buf));
        write(fd1, &ret, sizeof(ssize_t));
        write(fd1, buf, ret);


    }

    close(fd1);
    close(fd2);
    return 0;
}

